<?php
$HTMLstr .= '<div class="body">
    <div class="findOne">';

if ($user->getId() == $this->oneModel->getKomu()) {
    $HTMLstr .= '
    <div class="fetchallOneInsideAvatar">
    <a href="?controller=user&id='. $this->oneModel->getKto() .'">
    <img height="100%" src="stuff/images/saved/'. model_ConfigMapper::findAvatar2($this->oneModel->getKto()) .'.jpg">
    </a>
    </div>
    <div class="findOneInsideLeft">
    <div class="fetchallOneInsideTitle">
     Получено от
     </div>
     <div class="fetchallOneInsideTitle">
     <a href="?controller=user&id='. $this->oneModel->getKto() .'">
       '. model_ConfigMapper::findAuthor($this->oneModel->getKto()) .'
           </a>
           </div>
           <div class="fetchallOneInsideTitle">
           '. $this->oneModel->getDate() .'
               </div>';
} else {
    $HTMLstr .= '
    <div class="fetchallOneInsideAvatar">
    <a href="?controller=user&id='. $this->oneModel->getKomu() .'">
    <img height="100%" src="stuff/images/saved/'. model_ConfigMapper::findAvatar2($this->oneModel->getKomu()) .'.jpg">
    </a>
    </div>
    <div class="findOneInsideLeft">
    <div class="fetchallOneInsideTitle">
     Получено от
     </div>
     <div class="fetchallOneInsideTitle">
     <a href="?controller=user&id='. $this->oneModel->getKomu() .'">
       '. model_ConfigMapper::findAuthor($this->oneModel->getKomu()) .'
           </a>
           </div>
           <div class="fetchallOneInsideTitle">
           '. $this->oneModel->getDate() .'
               </div>';
}
$HTMLstr .= '</div>
    <div class="fetchallOneInsideTitle">
    '. $this->oneModel->getText() .'
        </div>
        <div class="fetchallOneInsideAct">
        <a href="index.php?controller=message&action=delete&id='.$this->oneModel->getId().'">удалить</a>
</div>
</div>';

if ($user->getId() == $this->oneModel->getKomu()) {
    include 'view/messages/edit.phtml';
}
$HTMLstr .= '<div class="space"></div>
    <div class="fetchallOneInsideAct">
    <a href="?controller=message&action=index">Ко всем сообщениям</a>
    </div>
    </div>';